﻿/*------------------------------------------------
// File Description: ReworkProduct DataBase Entity
// Author:			 Crane
// Create Time:		 2020-06-25 17:39:19
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
	/// <summary>
	/// 返工组件清单
	/// </summary>
	[Table(nameof(ReworkProduct))]
	public class ReworkProduct : BaseEntity
	{
		private string _orderNo = string.Empty;
		private string _workOrderNo = string.Empty;
		private string _workshopCode = string.Empty;
		private string _workshopName = string.Empty;
		private string _cabinetNo = string.Empty;
		private string _packBatchNo = string.Empty;
		private string _packNo = string.Empty;
		private string _barCode = string.Empty;
		private string _productCode = string.Empty;
		private string _productName = string.Empty;
        private string _reworkNo;

        #region Public Property
        ///<Summary>
        /// 返工单号
        ///</Summary>
        public string ReworkNo
		{
			get { return string.IsNullOrWhiteSpace(_reworkNo) ? string.Empty : _reworkNo; }
			set { _reworkNo = value; }
		}

		///<Summary>
		/// 订单号
		///</Summary>
		public string OrderNo
		{
			get { return string.IsNullOrWhiteSpace(_orderNo) ? string.Empty : _orderNo; }
			set { _orderNo = value; }
		}

		///<Summary>
		/// 工单号
		///</Summary>
		public string WorkOrderNo
		{
			get { return string.IsNullOrWhiteSpace(_workOrderNo) ? string.Empty : _workOrderNo; }
			set { _workOrderNo = value; }
		}

		///<Summary>
		/// 返工车间
		///</Summary>
		public string WorkshopCode
		{
			get { return string.IsNullOrWhiteSpace(_workshopCode) ? string.Empty : _workshopCode; }
			set { _workshopCode = value; }
		}

		///<Summary>
		/// 返工车间
		///</Summary>
		public string WorkshopName
		{
			get { return string.IsNullOrWhiteSpace(_workshopName) ? string.Empty : _workshopName; }
			set { _workshopName = value; }
		}

		///<Summary>
		/// 柜号
		///</Summary>
		public string CabinetNo
		{
			get { return string.IsNullOrWhiteSpace(_cabinetNo) ? string.Empty : _cabinetNo; }
			set { _cabinetNo = value; }
		}

		///<Summary>
		/// 打包批次号
		///</Summary>
		public string PackBatchNo
		{
			get { return string.IsNullOrWhiteSpace(_packBatchNo) ? string.Empty : _packBatchNo; }
			set { _packBatchNo = value; }
		}

		///<Summary>
		/// 打包编号
		///</Summary>
		public string PackNo
		{
			get { return string.IsNullOrWhiteSpace(_packNo) ? string.Empty : _packNo; }
			set { _packNo = value; }
		}

		///<Summary>
		/// 组件条码
		///</Summary>
		public string BarCode
		{
			get { return string.IsNullOrWhiteSpace(_barCode) ? string.Empty : _barCode; }
			set { _barCode = value; }
		}

		///<Summary>
		/// 组件料号
		///</Summary>
		public string ProductCode
		{
			get { return string.IsNullOrWhiteSpace(_productCode) ? string.Empty : _productCode; }
			set { _productCode = value; }
		}

		///<Summary>
		/// 组件名称
		///</Summary>
		public string ProductName
		{
			get { return string.IsNullOrWhiteSpace(_productName) ? string.Empty : _productName; }
			set { _productName = value; }
		}

		///<Summary>
		/// 返工状态
		///</Summary>
		public Enum.ProduceStatus ProduceStatus { get; set; }
		#endregion
	}

	public partial class MESContext
	{
		/// <summary>
		/// 返工组件清单
		/// </summary>
		public virtual DbSet<ReworkProduct> ReworkProducts { get; set; }
	}
}